//
//  CustomAnimationView.swift
//  TanTan_Kotlin
//
//  Created by EDY on 5/26/25.
//

import SwiftUI

struct CustomAnimationView:View {
    @State private var isExpanded = false
    var body: some View {
        VStack {
            Circle()
                .fill(.green)
                .frame(width: isExpanded ? 150 : 75, height: isExpanded ? 150 : 75)
                .animation(Animation.easeInOut(duration: 1).repeatCount(3), value: isExpanded)
            Button("切换"){
                withAnimation {
                    isExpanded.toggle()
                }
            }
        }
    }
}
